import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
import reducers from './reducers';
import thunk from 'redux-thunk';

// 如果需要让store支持异步action则必须添加参数applyMiddleware(thunk)
// 调用开发者工具composeWithDevTools
export default createStore(reducers, composeWithDevTools(applyMiddleware(thunk)));
